home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Astronomy / Moon / Source / HugeMoonView.m < prev    next >
Text File  |  1993-01-19  |  772b  |  36 lines

  1. /* HugeMoonView.m
  2.  * Part of the Moon application for the NeXT computer.
  3.  * Author:  Geoffrey S. Knauth
  4.  * Date:    January 4, 1992
  5.  *
  6.  * Permission to copy this program is hereby granted under the terms
  7.  * of the Free Software Foundation's GNU General Public License.
  8.  */
  9.  
  10. #import <appkit/NXImage.h>
  11. #import "HugeMoonView.h"
  12.  
  13. @implementation HugeMoonView
  14.  
  15. - initFrame:(const NXRect *)frameRect
  16. {
  17.     [super initFrame:frameRect];
  18.     image = [[NXImage alloc] initFromSection:"FullMoon.tiff"];
  19.     return self;
  20. }
  21.  
  22. - drawSelf :(const NXRect *)rects :(int)rectCount
  23. {
  24.   /* draw the image of the moon */
  25.     [image composite:NX_COPY toPoint:&bounds.origin];
  26.     return self;
  27. }
  28.  
  29. - free
  30. {
  31.     [image free];        /* Free the image on our way out. */
  32.     return [super free];
  33. }
  34.  
  35. @end
  36.